<?php
$baseUrl = Yii::app()->baseUrl;
$controllerId = $this->getUniqueId();
?>
<?php if (strtolower($controllerId) != 'signin'): ?>
    <!DOCTYPE html>
    <html lang="en">
        <head>
            <meta http-equiv="content-type" content="text/html; charset=UTF-8">
            <meta charset="utf-8">

    <!-- <script src="Expensify%20-%20Expenses_files/ga.js" async="" type="text/javascript"></script><script>
                 var g_perf = {
                     header: new Date().getTime()
                 };
             </script>
             <script>
                 // Load json2 from CDN if not here already
                 if( typeof JSON == 'undefined' || typeof JSON.parse == 'undefined' || typeof JSON.stringify == 'undefined' ){
                     document.write('<script src="//cdnjs.cloudflare.com/ajax/libs/json2/20121008/json2.js"><\/script>');
                 }
             </script>-->

            <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
            <!--[if IE 6]>
                        <script type="text/javascript">
                            var sPath = window.location.pathname;
                            var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
                            if (sPage != "browserupgrade")
                            window.location="browserupgrade";
                        </script>
                    <![endif]-->
            <title>Expensify - Expenses</title>

            <link rel="stylesheet" type="text/css"
                  href="<?php echo $baseUrl; ?>/css/globals.css">
            <!--[if IE 7]>
                         <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>/css/ie7.css">
                     <![endif]-->

            <!--[if IE 8]>
                        <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>/css/ie8.css">
                    <![endif]-->

            <!--[if lte IE 9]>
                        <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>/css/ie9.css">
                    <![endif]-->

        </head>


        <body id="<?php echo $controllerId != "site" ? $controllerId : "dashboard"; ?>"
              style="min-height: 634px; height: 100%; overflow-y: auto;">


            <div id="header">
                <a href="<?php echo $baseUrl; ?>">
                    <h1>Expense system</h1>
                </a>




                <div id="topnav">
                    <ul>
                        <li>Welcome, <strong><?php echo Yii::app()->user->name; ?></strong></li>
                        <li style="display: none;" class="activePolicy"><label
                                for="activePolicySelector">Primary Policy</label> <select
                                name="activePolicySelector" class="activePolicySelector"
                                id="activePolicySelector">
                                <option value="4DCC77CEBDDFB403">(none)</option>
                            </select></li>

                    </ul>
                    <ul class="bottomlinks">
                        <li><a href="<?php echo $baseUrl; ?>/signin/logout" class="js_signout">Sign Out</a></li>
                        <li><a target="_blank" href="#" class="help">Help</a></li>
                        <li class="last"><a class="feedback" href="#">Feedback</a></li>
                    </ul>
                </div>

            </div>
            <!-- New HTML Start Here-->

            <div id="topMenu"><!--topMenu start here-->
                <ul class="floatBoxes">
                    <?php if ($controllerId == 'dashboard'): ?>
                        <li id="page_dashboard" class="current"><a
                                href="<?php echo $baseUrl; ?>/dashboard" class="app_page">Dashboard</a></li>
                        <?php else: ?>
                        <li id="page_dashboard"><a
                                href="<?php echo $baseUrl; ?>/dashboard" class="app_page">Dashboard</a></li>
                        <?php endif; ?>
                        <?php if ($controllerId == 'expenses'): ?>
                        <li id="page_expense" class="current"><a
                                href="<?php echo $baseUrl; ?>/expenses" class="app_page">Expenses</a></li>
                        <?php else: ?>
                        <li id="page_expense"><a
                                href="<?php echo $baseUrl; ?>/expenses" class="app_page">Expense</a></li>
                        <?php endif; ?>
                        <?php if ($controllerId == 'receipts'): ?>
                        <li id="page_receipt" class="current"><a
                                href="<?php echo $baseUrl; ?>/receipts" class="app_page">Receipts</a></li>
                        <?php else: ?>
                        <li id="page_receipt"><a
                                href="<?php echo $baseUrl; ?>/receipts" class="app_page">Receipts</a></li>
                        <?php endif; ?>
                        <?php if ($controllerId == 'Analysis'): ?>
                        <li id="page_analysis" class="current"><a
                                href="<?php echo $baseUrl; ?>/standardreports" class="app_page">Analysis</a></li>
                        <?php else: ?>
                        <li id="page_analysis"><a
                                href="<?php echo $baseUrl; ?>/standardreports" class="app_page">Analysis</a></li>
                        <?php endif; ?>
                        <?php if ($controllerId == 'reports'): ?>
                        <li id="page_report" class="current"><a
                                href="<?php echo $baseUrl; ?>/reports" class="app_page">Reports</a></li>
                        <?php else: ?>
                        <li id="page_report"><a
                                href="<?php echo $baseUrl; ?>/reports" class="app_page">Reports</a></li>
                        <?php endif; ?>

                    <?php if ($controllerId == 'settings'): ?>
                        <li id="page_settings" class="current"><a
                                href="<?php echo $baseUrl; ?>/settings/account" class="app_page iconButton"></a></li>
                        <?php else: ?>
                        <li id="page_setting"><a
                                href="<?php echo $baseUrl; ?>/settings/account" class="app_page iconButton"></a></li>
                        <?php endif; ?>

                </ul>
            </div>
            <!--topMenu ends here-->

            <div id="wrapper"><!--wrapper start here--> <?php /* @var $this Controller */ ?>
                <?php $this->beginContent('//layouts/main'); ?> <?php echo $content; ?>

                <?php $this->endContent(); ?> <?php /* @var $this Controller */ ?></div>

            <!-- close sticky_footer -->
            <div id="home_footer" class=" fullWidth ">
                <div id="footer">
                    <ul class="textLinks">

                        <li><a href="#" target="_blank">About Us</a></li>
                        <li><a href="#" target="_blank">Blog</a></li>
                        <li><a href="#" target="_blank" title="Status">Status</a></li>
                        <li><a href="#" target="_blank">Terms</a></li>
                        <li><a href="#" target="_blank" class="feedback">Help</a></li>
                        <li class="last">© 2013 Expense System.</li>
                    </ul>
                    <a href="#" class="socialMediaButton twitter" target="_blank">Twitter</a>
                    <a href="#" class="socialMediaButton facebook" target="_blank">Facebook</a>
                    <a href="#" class="socialMediaButton googleplus" target="_blank">Google Plus</a>
                    <a href="#" class="socialMediaButton linkedin" target="_blank">LinkedIn</a>
                </div>
            </div>

        </body>
    </html>
<?php else: ?>
    <?php $this->beginContent('//layouts/main'); ?> 
    <?php echo $content; ?>

    <?php $this->endContent(); ?> <?php /* @var $this Controller */ ?></div>
<?php endif; ?>

